<div class="panel panel-default">
    
    <div class="panel-heading">
        <h3 class="panel-title"><i class='fa fa-link pull-left'></i>&nbsp;<%= t("views.admin.menus.partials.menu_accordion.link") %></h3>
        <div class="actions pull-right">
            <i class="fa fa-chevron-down"></i>
        </div>
    </div>
    <div class="panel-body">

      <form data-type="normal">
        <input type="hidden" name="type" value="page" />
        <div class="form-group">
            <select name="linkto" class="mod form-control">
                <option value=""><%= t("views.admin.menus.partials.menu_accordion.select_an_option") %></option>
                <optgroup label="Pages">
                    <% Roroacms::Post.where(:post_type => 'page', :disabled => 'N').each do |opt| %>
                        <option value="<%= opt.id %>" data-type="page"><%= opt.post_title %></option>
                    <% end %>
                </optgroup>

                <optgroup label="Articles">
                    <% Roroacms::Post.where(:post_type => 'post', :disabled => 'N').each do |opt| %>
                        <option value="<%= opt.id %>" data-type="article"><%= opt.post_title %></option>
                    <% end %>
                </optgroup>
                <optgroup label="<%= Roroacms::Setting.get('articles_slug').capitalize %>">
                    <option value="news" data-type="<%= Roroacms::Setting.get('articles_slug').downcase %>"> <%= Roroacms::Setting.get('articles_slug').capitalize %> <%= t("views.admin.generic.page") %></option>
                </optgroup>
                <optgroup label="Categories">
                    <% Roroacms::Term::CATEGORIES.each do |opt| %>
                        <option value="<%= opt.id %>" data-type="category"><%= opt.name %></option>
                    <% end %>
                </optgroup>
                <optgroup label="Tags">
                    <% Roroacms::Term::TAGS.each do |opt| %>
                        <option value="<%= opt.id %>" data-type="tag"><%= opt.name %></option>
                    <% end %>
                </optgroup>
            </select>   
        </div>

        <div class="form-group">
            <input name="label" type="text" placeholder="<%= t("views.admin.menus.partials.menu_dropdown.placeholder_2") %>" class="form-control">
        </div>
        <div class="form-group">
            <input name="class" type="text" placeholder="<%= t("views.admin.menus.partials.menu_dropdown.placeholder_3") %>" class="form-control">
        </div>

        <label><%= t("views.admin.generic.target") %></label>
        <div class="form-group">
            <div class="radio-inline">
                <input type="radio" value="sw" name="target" checked="checked"><%= t("views.admin.menus.generic.same_window") %>
            </div>
            <div class="radio-inline">
                <input type="radio" value="nt" name="target"><%= t("views.admin.menus.generic.new_tab") %>
            </div>
        </div>

        <div class='formSepUpp'>
            <hr>
            <button type="submit" class='btn btn-sm btn-block btn-primary pull-left'> 
                <i class="fa fa-plus"></i>&nbsp; <%= t("views.admin.menus.generic.add_link") %>
              </button>
        </div>

      </form> 

    </div>

</div>